Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@resistdesign/node-googlehome

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@resistdesign/node-googlehome

It uses Node.js to communicate with Google Home.

  • 1.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
increased by200%
Maintainers
1
Weekly downloads
 
Created
Source

node-googlehome

It uses Node.js to communicate with Google Home.

npm version Build Status

Install

npm

$ npm install node-googlehome --save

yarn

$ yarn add node-googlehome

Usage

const GoogleHome = require('node-googlehome')

/**
 * search google home.
 * @param {waitTime: number(default: 1000)}
 */
GoogleHome.search(1000)
  .then(resp => { console.log(resp) })

/**
 * connect google home with IP.
 * @param {ip_address: string}
 */
let device = new GoogleHome.Connecter('192.168.11.13')

/**
 * setting language
 * @param {{lang: string(default: 'en')}}
 */
device.config({lang: 'ja'})


/**
 * Start speaker.
 * If you do this, google home will immediately sound when you call speak() or playMedia()
 */
device.readySpeaker()
  .then(() => { /* do something */ })

/**
 * play media. pass media url.
 * @param {url: string}
 */
device.playMedia('http://www.hypertrombones.jp/sample/system7.mp3')
  .then(console.log)
  .catch(console.log)

/**
 * google home speak!
 * @param {message: string, speed: number(default:1), timeout: number(default: 3000)}
 */
device.speak('こんにちは!')
  .then(console.log)
  .catch(console.log)

Requirements

・Node.js >= v7

FAQs

Package last updated on 05 Jan 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc